<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<title>疫情地图</title>
<script src="jquery-1.8.3.min.js"></script>
<script src="https://cdn.bootcss.com/echarts/4.7.0/echarts.min.js"></script>
<script src="http://cdn.zaixianke.com/china.js"></script>
<script src="http://cdn.zaixianke.com/world.js"></script>
<script type="text/javascript">
    var data = "";
//    console.log("1. "+data);
//    $(function() {    // HTML加载完后才运行
        $.ajax({
            type: "get",
            url: "index.php",
            async: false, //必须设置为false，才能实现data的全局变量赋值
            success: function(msg) {
                data = msg;
//                console.log("2. "+data);
            },
            error: function(msg) {
                alert("发生错误：" + msg.status);
            }
        });
//    });
//    console.log("3. "+data);
</script>
</head>
<body>
<div id="main" style="width: 100%;height:600px;"></div> <br>
<div id="div1" style="text-align:center">
		<a style="color:#333" class="control" align="center" href="javascript:updateMap(0)">国内累计</a>
		<a style="color:#333" class="control" align="center" href="javascript:updateMap(1)">国内新增</a>
		<a style="color:#333" class="control" align="center" href="javascript:updateMap(2)">全球累计</a>
		<a style="color:#333" class="control" align="center" href="javascript:updateMap(3)">全球新增</a>
</div>
<script src="control.js"></script>
</body>
</html>
